<template>
  <div id="app">
    <SideBar :config="config" :data="data"></SideBar>
    <div id="container">
      <main id="main">
        <router-view>
        </router-view>
      </main>
    </div>
  </div>
</template>

<script>
import SideBar from './components/SideBar'
import config from './config'
import docMan from './docMan'

export default {
  components: {SideBar},
  name: 'App',
  data () {
    return {
      config,
      data: []
    }
  },
  beforeMount () {
    docMan.tree().then(data => {
      this.data = data
    })
  }
}
</script>

<style lang="less" rel="text/less">
  html, body {
    height: 100%;
    margin: 0;
    padding: 0
  }

  ::selection {
    color: #FFF;
    background-color: #699969;
  }

  ::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }

  ::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, .06);
  }

  ::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, .2);
  }

  a:link, a:visited {
    color: #1d7bb9;
  }

  a:hover, a:focus {
    color: #e06924;
  }

  #app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #2c3e50;
    font-size: 16px;
    width: 960px;
    height: inherit;
    margin: 0 auto;
  }

  #container {
    height: 100%;
    margin-left: 245px;
    overflow: auto;
  }
</style>
